﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Windows.UI.Xaml;
using Windows.UI.Xaml.Controls;

namespace CC98.Text.UBB
{
    public interface IUBBType
    {
        /// <summary>
        /// True means this element will host real display data (not an attribute)
        /// </summary>
        bool IsContentElement { get; }
    }

    public interface IUBBContentType : IUBBType
    {
        /// <summary>
        /// Build content element
        /// </summary>
        /// <param name="attributes"></param>
        /// <returns></returns>
        FrameworkElement BuildElement(ITextControlFactory textControlFactory, UBBPiece piece, IEnumerable<IUBBAttributeType> attributes);
    }

    public interface IUBBAttributeType : IUBBType
    {
        /// <summary>
        /// Default attribute applying method
        /// </summary>
        /// <param name="control"></param>
        void Apply(Control control);
    }
}
